
<?

require_once ("application.list.inc");

global $_GLOBAL_DBH;
global $_OBJECT_IFACE_PANEL;

$indexes = array (
	last=>array (label=>"Last",order=>"DEFAULT",wrapper=>"vmc_icon_user"),
	first=>array (label=>"First",order=>"DEFAULT"),
	email=>array (label=>"Email",order=>"DEFAULT",wrapper=>"vmc_icon_mail"),
	phone_1=>array (label=>"Phone",order=>"DEFAULT",wrapper=>"vmc_icon_phone"),
	city=>array (label=>"City",order=>"DEFAULT"),
	createdate=>array (label=>"Create Date",order=>"DEFAULT",wrapper=>"vmc_icon_date"),
);

$object_ctl = null;
$link_options = "&fs_tab=phases&project_id={$_REQUEST["project_id"]}&fs_tab_option=fs_phases&fs_action=view&fs_tab_phases=users&phase_id={$_REQUEST["phase_id"]}";
$list_options = array ();

$_OBJECT_IFACE_LIST = _app_create_list_object (array (
                db_conn=>$_GLOBAL_DBH,
                indexes=>$indexes,
		list_count=>"SELECT COUNT(*) FROM project_milestone_workgroups_view,project_phase_workgroups_view,user_workgroups_view WHERE project_phase_workgroups_view.phase_id={$_REQUEST["phase_id"]} AND project_phase_workgroups_view.id=project_milestone_workgroups_view.workgroup_id AND project_phase_workgroups_view.workgroup_id=user_workgroups_view.workgroup_id GROUP BY user_workgroups_view.user_id",
		list_count_rows=>true,
		list_select=>"SELECT users.*,profiles.* FROM project_milestone_workgroups_view,project_phase_workgroups_view,user_workgroups_view,users,profiles WHERE project_phase_workgroups_view.phase_id={$_REQUEST["phase_id"]} AND project_phase_workgroups_view.id=project_milestone_workgroups_view.workgroup_id AND project_phase_workgroups_view.workgroup_id=user_workgroups_view.workgroup_id AND user_workgroups_view.user_id=users.id AND users.id=profiles.uid GROUP BY users.id",
                list_id=>"lc_project_milestone_users",
                list_options=>$list_options,
                primary_key=>"id",
                primary_relation=>"user_id",
                link_options=>$link_options,
                object_ctl=>$object_ctl
));

$_OBJECT_IFACE_TABBING_PANEL->insert_container ($_OBJECT_IFACE_LIST);

?>
